package com.whli.autumn.mall.web.controller.convert.metadata;

import com.whli.autumn.mall.metadata.domain.dto.productinfo.ProductInfoAddDTO;
import com.whli.autumn.mall.metadata.domain.dto.productinfo.ProductInfoUpdateDTO;
import com.whli.autumn.mall.metadata.domain.entity.ProductInfo;
import com.whli.autumn.mall.metadata.domain.vo.productinfo.ProductInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>商品信息转换工具</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-04-09 09:32
 */
@Mapper
public interface ProductInfoConvert {

    ProductInfoConvert INSTANCE = Mappers.getMapper(ProductInfoConvert.class);

    ProductInfo addToDomain(ProductInfoAddDTO dto);

    ProductInfo updateToDomain(ProductInfoUpdateDTO dto);

    ProductInfoVO domainToVO(ProductInfo entity);

}
